﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using ERP.BusinessEntities.Base;

namespace ERP.DAL.Base
{
    public interface IDal
    {
        #region Read
        DataSet GetDataset(String strQuery);

        Object GetObjectFromDataRow(DataRow datarow);

        List<Object> GetListObject(DataSet ds);

        void GetListObject(DataSet ds, List<Object> lst);

        DataSet GetAllObjects();

        Object GetObjectById(int ObjectID);

        DataSet GetAllObjectByColumnValue(String strColumn, object value);

        DataSet GetDataSetByCondition(String strConditions);

        DataSet GetCustomDataSetByCondition(String strFieldToSelect, String strConditions);

        #endregion

        #region Update
        int Update(BaseBusinessInfo businessObj);
        void UpdateList(List<BaseBusinessInfo> lstObj);
        #endregion

        #region Insert
        int CreateObject(BaseBusinessInfo businessObj);
        #endregion

        #region Delete
        void PermanentDeleteObject(BaseBusinessInfo Obj);
        void Delete(BaseBusinessInfo Obj);
        void Delete(int iObjID);
        void DeleteAllByParentID(String strForeignColumn, int iParentID);
        //void DeleteObject(int iObjectID, String strTable);
        //void DeleteObjects(string strTable, String strColumn, object ColumnValue);
        //void DeleteObjects(String strTable, List<BusinessObject> lstObj);
        #endregion
    }
}
